<%--张爱文，增加用户 --%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>增加车票信息</title>

<link rel="stylesheet" type="text/css"
	href="../js/util/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="../js/util/easyui/themes/icon.css">

<script type="text/javascript"
	src="../js/util/jquery/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
	src="../js/util/easyui/jquery.easyui.min.js"></script>

</head>
<body>
	<form action="http://127.0.0.1:8080/Our12306/ManageAddTicketServlet"
		method="post">
		<h2>管理员增加车票信息</h2>

		<div style="margin: 20px 0;"></div>
		<div class="easyui-panel" title="Add"
			style="width: 100%; max-width: 400px; padding: 30px 60px;">
			<!-- 出发地 -->
			<div style="margin-bottom: 20px">
				<input name="depature" class="easyui-textbox" label="出发地:"
					labelPosition="top" style="width: 100%; height: 52px">
			</div>
			<!-- 目的地 -->
			<div style="margin-bottom: 20px">
				<input name="destinction" class="easyui-textbox" label="目的地:"
					labelPosition="top" style="width: 100%; height: 52px">
			</div>
			<!-- 车次 -->
			<div style="margin-bottom: 20px">
				<input name="trainno" class="easyui-textbox" label="车次:"
					labelPosition="top" style="width: 100%; height: 52px">
			</div>
			
			
			<!-- 出发时间 -->
			<div style="margin-bottom: 20px">
				<input id="starttime" name="birthday" class="easyui-datebox"
					label="出发时间:" labelPosition="top"
					data-options="formatter:myformatter,parser:myparser"
					style="width: 100%;">
			</div>
	
			<!-- 座位号  -->
			<div style="margin-bottom: 20px">
				<input name="seatno" class="easyui-textbox" label="座位号:"
					labelPosition="top" style="width: 100%; height: 52px">
			</div>

			<!-- 花费的时间-->
			<div style="margin-bottom: 20px">
				<input name="costtime" class="easyui-textbox" label="花费的时间:"
					labelPosition="top" style="width: 100%; height: 52px">
			</div>
			
			<!-- 票数-->
			<div style="margin-bottom: 20px">
				<input name="ticketno" class="easyui-textbox" label="票数:"
					labelPosition="top" style="width: 100%; height: 52px">
			</div>
			
			<div>
				<input type="submit" class="easyui-linkbutton" iconCls="icon-ok"
					style="width: 100%; height: 32px">
			</div>
		</div>
	</form>


	<script type="text/JavaScript">
		function myformatter(date) {
			var y = date.getFullYear();
			var m = date.getMonth() + 1;
			var d = date.getDate();
			return y + '-' + (m < 10 ? ('0' + m) : m) + '-'
					+ (d < 10 ? ('0' + d) : d);
		}

		function myparser(s) {
			if (!s)
				return new Date();
			var ss = (s.split('-'));
			var y = parseInt(ss[0], 10);
			var m = parseInt(ss[1], 10);
			var d = parseInt(ss[2], 10);
			if (!isNaN(y) && !isNaN(m) && !isNaN(d)) {
				return new Date(y, m - 1, d);
			} else {
				return new Date();
			}
		}
	</script>
</body>
</html>